
<form id="add-form" class="form-horizontal col-sm-12" role="form" data-toggle="validator" method="POST" action="">
	{:token()}
	<input type="hidden" name="row[id]" value="{$row.id}">
	<div class="form-group">
		<div class="col-xs-12 col-sm-6">
			<div class="form-group col-sm-10">
				<label for="c-title">任务计划标题:</label>
				<input id="c-title" data-rule="required" class="form-control"
					   placeholder="任务计划标题" name="row[title]" value="{$row.title}" type="text">
			</div>
		</div>

		<div class="col-xs-12 col-sm-6">
			<div class="form-group col-sm-10">
				<label for="c-relation_id">关联客户:</label>
				<input id="c-relation_id" data-rule="required" placeholder="请选择客户"
					   class="form-control selectpage" name="row[relation_id]"
					   data-source="qingdongams/common/getCustomer" type="text" value="{$row.relation_id}" >

			</div>
		</div>
		<div class="col-xs-12 col-sm-6">
			<div class="form-group col-sm-10">
				<label for="c-event_type_1">计划类型:</label>
				<select id="c-event_type_1" name="row[event_type][]" class="form-control">
					<option value="">请选择计划类型</option>
					<option value="客户服务"
							{eq name="$row.event_type.0" value="客户服务" }selected="selected"{/eq}>客户服务</option>
					<option value="售后服务"
							{eq name="$row.event_type.0" value="售后服务" }selected="selected"{/eq}>售后服务</option>
				</select>
			</div>
		</div>
		<div class="col-xs-12 col-sm-6">
			<div class="form-group col-sm-10">
				<label for="c-event_type_2">服务方式:</label>
				<select id="c-event_type_2" name="row[event_type][]" data-value="{if condition="isset($row['event_type'][1])"}{$row.event_type.1}{/if}"
						class="form-control">
					<option value="">请选择服务方式</option>
				</select>
			</div>
		</div>
		<div class="col-xs-12 col-sm-6" style="display: none" id="event_type_3">
			<div class="form-group col-sm-10">
				<label for="c-event_type_3">服务目的:</label>
				<select id="c-event_type_3" name="row[event_type][]"
						{if condition="isset($row['event_type'][2])"} data-value="{$row.event_type.2}"{/if} class="form-control">
					<option value="">请选择服务目的</option>
				</select>
			</div>
		</div>
		<div class="col-xs-12 col-sm-6">
			<div class="form-group col-sm-10">
				<label for="c-level">紧要程度:</label>
				<select id="c-level" name="row[level]" class="form-control">
					<option value="0" {eq name="$row.level" value="0" }selected="selected"{/eq} >普通</option>
					<option value="1" {eq name="$row.level" value="1" }selected="selected"{/eq} >重要</option>
					<option value="2" {eq name="$row.level" value="2" }selected="selected"{/eq} >紧急</option>
					<option value="4" {eq name="$row.level" value="4" }selected="selected"{/eq} >重要且紧急</option>
				</select>
			</div>
		</div>

		<div class="col-xs-12 col-sm-6">
			<div class="form-group col-sm-10">
				<label>指派员工:</label>
				<input id="c-owner_staff_id" data-rule="required" class="form-control selectpage"
					   name="row[staff_id]" placeholder="请选择员工"
					   data-source="qingdongams/common/getStaff" type="text" value="{$row.staff_id}">
			</div>
		</div>

		<div class="col-xs-12 col-sm-6">
			<div class="form-group col-sm-10">
				<label for="c-start_time">开始时间:</label>
				<input id="c-start_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" placeholder="选择开始时间" name="row[start_time]"
					   type="text" value="{$row.start_time}">
			</div>
		</div>
		<div class="col-xs-12 col-sm-6">
			<div class="form-group col-sm-10">
				<label for="c-end_time">预计结束时间:</label>
				<input id="c-end_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" placeholder="选择开始时间" name="row[end_time]"
					   type="text" value="{$row.end_time}">
			</div>
		</div>
		<div class="col-xs-12 col-sm-6">
			<div class="form-group col-sm-10">
				<label for="c-remindtype">提醒:</label>
				<select id="c-remindtype" name="row[remindtype]" class="form-control">
					<option value="0" {eq name="$row.remindtype" value="0" }selected="selected"{/eq}>准时提醒</option>
					<option value="1" {eq name="$row.remindtype" value="1" }selected="selected"{/eq}>5分钟前</option>
					<option value="2" {eq name="$row.remindtype" value="2" }selected="selected"{/eq}>15分钟前</option>
					<option value="3" {eq name="$row.remindtype" value="3" }selected="selected"{/eq}>30分钟前</option>
					<option value="4" {eq name="$row.remindtype" value="4" }selected="selected"{/eq}>一个小时前</option>
					<option value="5" {eq name="$row.remindtype" value="5" }selected="selected"{/eq}>两个小时前</option>
					<option value="6" {eq name="$row.remindtype" value="6" }selected="selected"{/eq}>一天前</option>
					<option value="7" {eq name="$row.remindtype" value="7" }selected="selected"{/eq}>两天前</option>
					<option value="8" {eq name="$row.remindtype" value="8" }selected="selected"{/eq}>一周前</option>
				</select>
			</div>
		</div>

		<div class="col-xs-12 col-sm-10">
			<div class="form-group col-sm-10">
				<label>计划备注:</label>
				<textarea class="form-control" rows="3" name="row[remark]"
						  placeholder="请填写计划备注">{$row.remark}</textarea>
			</div>
		</div>

	</div>

	<div class="form-group layer-footer">
		<label class="control-label col-xs-12 col-sm-2"></label>
		<div class="col-xs-12 col-sm-8">
			<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
			<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
		</div>
	</div>
</form>
